package com.twu.biblioteca;


/**
 * Created by Nishi on 28/12/13.
 */
public class Menu {
    public static final int MAX_OPTION = 6;
    public static final int START =0;

    public static String greetingMessage() {
        return ("Welcome to Biblioteca");
    }

    public static String dispalyMainMenu() {
        return ("Biblioteca Menu \n1.List Books \n" +
                "2.CheckOut a Book \n3.Return Books \n" +
                "4.List Movies \n5.CheckOut a Movie \n6.Exit");
    }

    public static boolean isValidOption(int option) {
        if (option > START && option <= MAX_OPTION)
            return true;
        else
            return false;
    }

    public static int parseCustomerOption(String input){
        try {
           Integer.parseInt(input);
        }
        catch(NumberFormatException e)
            {
                return 0;
            }
        return(Integer.parseInt(input));
    }

}

